Optimal. Leaf size=38 \[ \frac {x}{2}-\frac {2 \text {ArcTan}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{6 (1+\tanh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.625, Rules used = {3742, 2099, 213,
632, 210} \begin {gather*} -\frac {2 \text {ArcTan}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}+\frac {x}{2}-\frac {1}{6 (\tanh (x)+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 213
Rule 632
Rule 2099
Rule 3742
Rubi steps
\begin {align*} \int \frac {1}{1+\tanh ^3(x)} \, dx &=\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (1+x^3\right )} \, dx,x,\tanh (x)\right )\\ &=\text {Subst}\left (\int \left (\frac {1}{6 (1+x)^2}-\frac {1}{2 \left (-1+x^2\right )}+\frac {1}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\tanh (x)\right )\\ &=-\frac {1}{6 (1+\tanh (x))}+\frac {1}{3} \text {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,\tanh (x)\right )-\frac {1}{2} \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\tanh (x)\right )\\ &=\frac {x}{2}-\frac {1}{6 (1+\tanh (x))}-\frac {2}{3} \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 \tanh (x)\right )\\ &=\frac {x}{2}-\frac {2 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{6 (1+\tanh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 49, normalized size = 1.29 \begin {gather*} \frac {1}{36} \left (8 \sqrt {3} \text {ArcTan}\left (\frac {-1+2 \tanh (x)}{\sqrt {3}}\right )-9 \log (1-\tanh (x))+9 \log (1+\tanh (x))-\frac {6}{1+\tanh (x)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.34, size = 41, normalized size = 1.08
method | result | size |
derivativedivides | \(-\frac {\ln \left (\tanh \left (x \right )-1\right )}{4}-\frac {1}{6 \left (1+\tanh \left (x \right )\right )}+\frac {\ln \left (1+\tanh \left (x \right )\right )}{4}+\frac {2 \sqrt {3}\, \arctan \left (\frac {\left (2 \tanh \left (x \right )-1\right ) \sqrt {3}}{3}\right )}{9}\) | \(41\) |
default | \(-\frac {\ln \left (\tanh \left (x \right )-1\right )}{4}-\frac {1}{6 \left (1+\tanh \left (x \right )\right )}+\frac {\ln \left (1+\tanh \left (x \right )\right )}{4}+\frac {2 \sqrt {3}\, \arctan \left (\frac {\left (2 \tanh \left (x \right )-1\right ) \sqrt {3}}{3}\right )}{9}\) | \(41\) |
risch | \(\frac {x}{2}-\frac {{\mathrm e}^{-2 x}}{12}+\frac {i \sqrt {3}\, \ln \left ({\mathrm e}^{2 x}+i \sqrt {3}\right )}{9}-\frac {i \sqrt {3}\, \ln \left ({\mathrm e}^{2 x}-i \sqrt {3}\right )}{9}\) | \(47\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs.
\(2 (29) = 58\).
time = 0.47, size = 73, normalized size = 1.92 \begin {gather*} \frac {2}{9} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} + 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) - \frac {2}{9} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} - 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) + \frac {1}{2} \, x - \frac {1}{12} \, e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 95 vs.
\(2 (29) = 58\).
time = 0.36, size = 95, normalized size = 2.50 \begin {gather*} \frac {18 \, x \cosh \left (x\right )^{2} + 36 \, x \cosh \left (x\right ) \sinh \left (x\right ) + 18 \, x \sinh \left (x\right )^{2} - 8 \, {\left (\sqrt {3} \cosh \left (x\right )^{2} + 2 \, \sqrt {3} \cosh \left (x\right ) \sinh \left (x\right ) + \sqrt {3} \sinh \left (x\right )^{2}\right )} \arctan \left (-\frac {\sqrt {3} \cosh \left (x\right ) + \sqrt {3} \sinh \left (x\right )}{3 \, {\left (\cosh \left (x\right ) - \sinh \left (x\right )\right )}}\right ) - 3}{36 \, {\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 102 vs.
\(2 (36) = 72\).
time = 0.25, size = 102, normalized size = 2.68 \begin {gather*} \frac {9 x \tanh {\left (x \right )}}{18 \tanh {\left (x \right )} + 18} + \frac {9 x}{18 \tanh {\left (x \right )} + 18} + \frac {4 \sqrt {3} \tanh {\left (x \right )} \operatorname {atan}{\left (\frac {2 \sqrt {3} \tanh {\left (x \right )}}{3} - \frac {\sqrt {3}}{3} \right )}}{18 \tanh {\left (x \right )} + 18} + \frac {4 \sqrt {3} \operatorname {atan}{\left (\frac {2 \sqrt {3} \tanh {\left (x \right )}}{3} - \frac {\sqrt {3}}{3} \right )}}{18 \tanh {\left (x \right )} + 18} - \frac {3}{18 \tanh {\left (x \right )} + 18} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 25, normalized size = 0.66 \begin {gather*} \frac {2}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} e^{\left (2 \, x\right )}\right ) + \frac {1}{2} \, x - \frac {1}{12} \, e^{\left (-2 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 38, normalized size = 1.00 \begin {gather*} \frac {\frac {x}{2}+\frac {\mathrm {tanh}\left (x\right )}{6}+\frac {x\,\mathrm {tanh}\left (x\right )}{2}}{\mathrm {tanh}\left (x\right )+1}+\frac {2\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,\left (2\,\mathrm {tanh}\left (x\right )-1\right )}{3}\right )}{9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________